<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="favicon.ico" />
<link href="user/css/UserCenter.css?v=<?=WEB_VERSION?>" rel="stylesheet" type="text/css" />
<link href="user/css/Team.css?v=<?=WEB_VERSION?>" rel="stylesheet" type="text/css" />
<script src="user/js/jquery-1.7.1.min.js?v=<?=WEB_VERSION?>" type="text/javascript" language="javascript"></script>
<script src="user/js/UserWin.min.js?v=<?=WEB_VERSION?>" type="text/javascript" language="javascript"></script>
<script type="text/javascript" src="js_reserveCourse.htm"></script>
<script type="text/javascript"> 
$(document).ready( function(){
	$('#Dwj').click(function(){$('#Dwjus').attr("style","display:block;");
	$('#Dwjus textarea').focus( function(){$(this).attr("style","background:#fff;");});
	$('#Dwjus textarea').blur(function(){if($(this).val()==''){$(this).attr("style","background:none;");}});
});});
</script>
<title>100课堂会员中心</title>
</head>
<body>
<?
    include('userTop.php')
    ?>
<div class=CenterAuto>
	<?
    include('userLeft.php')
    ?>
 <div class="CenterRight">    
   <div class="CenterRightAuto">
	<?
    include('userMenu.php')
    ?> 
    <?php
    	//初始化活动的页面
    	$userInfo = HttpDaoManager::getUserDao()->get($_SESSION['user']['id']);
    	$userKindActiveFlg = HttpServerManager::getUserServer()->validateUserActiveKind($userInfo);
    	if($userKindActiveFlg==true){
			$targetCourseList = Common::_t('target_course_list');
			$initCourseArray = $targetCourseList[$userInfo['user_kind']];
			$init_selected_course_type = $initCourseArray['course_type'];
			$init_selected_course_list = $initCourseArray['course_list'];
			if(!empty($init_selected_course_list)){
				$init_selected_course = $init_selected_course_list['0'];
			}else{
				$courseList = HttpDaoManager::getCourseDao()->getListByType($init_selected_course_type) ;
				$courseIdList = Common::array_value_list($courseList, 'id');
				asort($courseIdList);
				$init_selected_course =$courseIdList[0];//获取最小的1个
			}
    	}
	?>					 
    <form action="user_subBooking.htm" name="Form1" method="post">
    <input name="id" type="hidden" value="<?=$id?>" />
    	<div class="Y_open">
			<div class="Y_oprw">
            	<div class="YopTio">您当前已选老师</div>
                <div class="YopTix">
                	<dl>
                    	<dt><img src="<?=SITE_URL.$portrait?>" width="122" height="160" /></dt>
                        <dd>上课老师：<em><?=$name?></em></dd>
                        <dd>上课时间：<em><?=$date?>&nbsp;&nbsp;<?=$time?></em></dd>
                        <?=$userClassTypeHtml?>
                      	<dd><em><font color="red" id="p_user_class_type_error"></font></em></dd>
                      	<input name="userClassType" type="hidden" value="<?=$userClassType?>" />
                      	<input name="today_monthly_booking" id="today_monthly_booking" type="hidden" value="<?=$today_monthly_booking?>" />
                      <div class="clearc"></div>
                    </dl>
                </div>
                <div class="YopT"></div>
            </div>
            <img class="y_OPr" width="49" height="49" src="user/images/wrico1.jpg" />
            <div class="clearc"></div>
        </div>
        <div class="Y_open2">
			<div class="Y_oprw">
            	<div class="YopTio">请选择课程与教材</div>
                <div class="YopTix">
				<div class="clearc"></div>
          <div class="rc_box" style="clear: both;">
           	<div style="overflow: hidden;">
                  <div class="YRiude" id='topcourse'>
                 	 	<?
                 	 	if(!$userKindActiveFlg){
	                	  	foreach ($course_type as $k=>$v){
					 	 	?>
	                    		<div id="Ra<?=$k?>"><input type="radio" name="course_type_radio" value="<?=$k?>"/><?=$v?></div>
	                        <?
						  	}
					  	}else{
							$courseTypeName = $course_type[$init_selected_course_type];
						?>
							<div id="Ra<?=$init_selected_course_type?>"><input type="radio" name="course_type_radio" value="<?=$init_selected_course_type?>" style="display: none"/></div>
						 <?}?>
                        <div class="clearc"></div>
                    </div>                         
 			 <div  id="subcoursecontenuer"  style='clear:both; width:100%; display:none;'>
				 <div class="rc_line_title"><span id='subcoursetitle'>学习教材</span>&gt;&gt;</div>
                 <div style='width:100%;height:auto;'>
					<ul id='subcourse_ul'>
                    </ul>
                 </div>
                 </div>
             <div id='thirdcoursecontenuer' style='clear:both;width:100%;display: none;'>
				<div class="rc_line_title"><span id="thirdcoursetitle">学习课程&gt;&gt;</span></div>
               <div style='width:100%;height:30px; font-size:13px; text-indent:1em;'>
             		    选择课程：
                   <select name="chapter" class="GreyBrim" id='thirdcourse'></select>
                   <a href="javascript:void(0);" id='view_course' style="display:none;"><img src="user/images/wezc2.jpg" /></a>
                </div>
                </div>
                </div>
                </div>
                    <div class="clearc"></div>
                </div>
                <div class="YopT"></div>
            </div>
            <img class="y_OPr" src="user/images/wrico2.jpg" />
            <div class="clearc"></div>
        </div>
        <div class="Y_open3">
			<div class="Y_oprw">
            	<div class="YopTio">请选择通讯软件及留言<div id="Dwj">给外教留言</div></div>
                <div class="YopTix">
                	<div id="Dwjus" style="display:none;"><textarea name="message"></textarea></div>
                	<div class="Wut_op">请选择通讯软件<select style=" margin-left:16px;" name="communication_tools" id="communication_tools">
                	<?=$communicationOption?>
                  </select><input type="checkbox" name="default" value="1" />设置为默认
                 	 <input type="hidden" name="default_communication" value="<?=$default_communication?>" id="default_communication">
                  </div>
                  <div style="margin-top:5px;">
                   <p id="QQ_NUMBER"  style="margin-top:5px;display:none">
                   QQ号码:&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="qq" id="qq" value="<?=getStr($user_communication_info, 'qq','')?>" size="30"  style="width:200px; height:24px; border:1px solid #ccc; line-height:24px;" >
                   	*请留下您正确的QQ号码,以方便老师与您交流,谢谢
                   <input type="hidden" name="old_qq" id="old_qq" value="<?=getStr($user_communication_info, 'qq') ?> ">
                   </p>
                   <p id="SKYPE_NUMBER"  style="margin-top:5px;display:none">SKYPE昵称:&nbsp;&nbsp;&nbsp;<input type="text" name="skype_id" id="skype_id" value="<?=getStr($user_communication_info, 'skype_id')?>"  size="30"
                   style="width:200px; height:24px; border:1px solid #ccc; line-height:24px;"
                   >
                   <input type="hidden" name="old_skype" id="old_skype" value="<?=getStr($user_communication_info, 'skype_id') ?>" >
                   	*请留下您正确的SKYPE昵称,以方便老师与您交流
                   </p>
                   <br>
                   <p id="PHONE_NUMBER"  style="margin-top:5px;display:none">电话号码:
                   <?if(getStr($user_communication_info, 'real_phone')!=2){?>
                   	&nbsp;&nbsp;<input type="text" name="phone" id="phone" value="<?=getStr($user_communication_info, 'phone')?>"  size="30"  style="width:200px; height:24px; border:1px solid #ccc; line-height:24px;">
                   	*该手机号将绑定您用户使用,请仔细填写
                   <?}else{?>	
                    <span style="width:60px;margin-left:20px;margin-top:10px;margin-bottom:10px;margin-right:120px;"><?=getStr($user_communication_info, 'phone')?></span>
                    <input type="hidden" name="phone" id="phone" value="<?=getStr($user_communication_info, 'phone')?>">
                   		*电话号码已验证无法更改,若需要更改,请联系我们。
                   	<?}?>
                   <input type="hidden" name="old_phone" id="old_phone" value="<?=getStr($user_communication_info, 'phone') ?>">
                   </p>
                   <?if(getStr($user_communication_info, 'real_phone')!=2){?>
                  <p id="CODE"  style="margin-top:5px;display:inline-block">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                   	&nbsp;&nbsp;<input type="text" name="code" id="code" value=""  size="10"  style="width:100px; height:24px; border:1px solid #ccc; line-height:24px;">
					 <input type="button" name="sms_code" id="sms_code" value="获取验证码" style="background:#A5C94B; margin-right:2px; padding:3px 10px; color:#fff;">
                   <?}?>	
                   </p>                   
                   <p id="ENGLISH_NAME"  style="margin-top:5px;display:none">英文名称:&nbsp;&nbsp;&nbsp;<input type="text" name="english_name" id="english_name" value="<?=getStr($user_communication_info, 'english_name')?>"  size="30" 
                   	  style="width:200px; height:24px; border:1px solid #ccc; line-height:24px;">
                   	*请留下您的英文名称,方便老师称呼您
                   <input type="hidden" name="old_english_name" id="old_english_name" value="<?=getStr($user_communication_info, 'english_name') ?>">
                   <input type="hidden" name="real_phone" id="real_phone" value="<?=getStr($user_communication_info, 'real_phone') ?>">
                   </p>
                  </div>
                </div>
                <div class="YopT"></div>
            </div>
            <img class="y_OPr" src="user/images/wrico3.jpg" />
            <div class="Wut_op">
            </div>
            <div >
            	<input type="button" name="confirm_book" id="confirm_book" class="cfbutton" value="">
            </div>
        </div>
   </form>
   <form id="view_course_form" style="display:none" target="_blank" method="post" action=""></form>
   </div>
   </div>
<div class="clearc"></div>
<script type="text/javascript" src="user/js/user_booking.min.js?v=<?=WEB_VERSION?>"></script>
<script type="text/javascript" src="user/js/user_info.min.js?v=<?=WEB_VERSION?>"></script>
</div>
<script>
$("#code_verify").click(function(){
	 phone =$("#phone").val();
	 var s = window.showModalDialog("user_verifycode.htm?phone="+phone,window,"dialogWidth=600px;dialogHeight=400px");
	 //var s = location.href="user_verifycode.htm?phone="+phone;
	 if(s.length>0){
		 $("#phone").attr("value",s);
		 $("#phone").attr("readonly",true);
		 $("#code_verify").css('display','none');
	  }
})	
</script>
<? 
if($userKindActiveFlg){
?>
<script>
$(document).ready( function(){
	$('input[name="course_type_radio"]').each(function(){
		var course_type = $(this).val();
		if(course_type==<?=$init_selected_course_type?>){
			$(this).attr('checked',true);
			$('input[name="course_type_radio"]:checked').trigger('click');
		}
	})

	$('input[name="course"]').each(function(){
		var course = $(this).val();
		if(course==<?=$init_selected_course?>){
			$(this).attr('checked',true);
			$('input[name="course"]:checked').trigger('click');
		}
		
	})

})
</script> 
<?}?>
<?
include('userFoot.php')
?>
</body>
</html>